package com.qfedu.tantu.controller;

import com.qfedu.tantu.service.intf.HousInfoService;
import com.qfedu.tantu.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: 赵金帅
 * @Date: 2022/07/02/0:26
 */
@RestController
@Api("酒店操作")
@CrossOrigin
@RequestMapping("/api/housinfo/")
public class HousinfoController {
    @Resource
    private HousInfoService service;

    @ApiOperation("查询酒店通过名字")
    @GetMapping("byname.do")
    public R selectAllByName(String housname){
        return service.selectAllByName(housname);
    }
    @ApiOperation("查询酒店地址")
    @GetMapping("location.do")
    public R selectByLocation(String location){
        return service.selectByLocation(location);
    }
    @ApiOperation("查询酒店详情")
    @GetMapping("info.do")
    public R selectAll(Integer id){
        return service.selectAll(id);
    }
    @ApiOperation("查询酒店所有")
    @GetMapping("all.do")
    public R selectAll(){
        return service.select();
    }
}
